<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
</body>
<script type="text/javascript">
    // 标准体重：男士体重=身高-100±3      女士体重=身高-110±3。写个函数，输入身高、体重、性别，输出偏重、正常。
    function fn(h, w, gender) {
        if(gender === "男"){
            if(w >= (h - 100 - 3) && w <= (h - 100 +3)){
                return '正常'
            }else{
                return '偏重'
            }
        }else{
            if(w >= (h - 110 - 3) && w <= (h - 110 +3)){
                return '正常'
            }else{
                return '偏重'
            }
        }
    }

    var res = fn(192,160,'男')
    console.log(res);
</script>

</html>